home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
dev
/
e
/
amigae33a.lha
/
E_v3.3a
/
Src.lha
/
Src
/
Tools
/
AmigaLib
/
time.e
< prev
Wrap
Text File
|
1995-03-30
|
568b
|
25 lines
OPT MODULE
MODULE 'amigalib/io',
'amigalib/ports',
'devices/timer',
'exec/io'
EXPORT PROC timeDelay(unit, seconds, micros)
DEF port, tr:PTR TO timerequest, error=TRUE
IF port:=createPort(NIL, 0)
IF tr:=createExtIO(port, SIZEOF timerequest)
IF OpenDevice('timer.device', unit, tr, 0)=0
tr.time.secs:=seconds
tr.time.micro:=micros
tr.io.command:=TR_ADDREQUEST
DoIO(tr)
CloseDevice(tr)
error:=FALSE
ENDIF
deleteExtIO(tr)
ENDIF
deletePort(port)
ENDIF
ENDPROC error